

$(document).ready(function(){
	
	$.mobile.ajaxEnabled = false;
	
});



$(document).bind('pageshow',function(){
	
	var a = "";
	var s = "";
	$('#barcode').val("");
	$(document).keypress(function(e)
	{
		
		s = String.fromCharCode(e.keyCode);
		if(e.which == 13){
			if(a.length<5)
			{
				alert("Please scan again");
			}else{
			
			$('#barcode').val(a);
			$('#form').submit();
				$(document).trigger('')
			}
		}else{
			a = a + s;
		}
		
		
	});
});
